from abc import ABC, abstractmethod
import pandas as pd
class BaseCrawler(ABC):
    def __init__(self, name, url, data_process_type=None,params=None):
        self.name = name
        self.url = url 
        self.data_process_type = data_process_type
        self.params = params or {}

    def fetch(self):
        """获取原始数据"""
        pass

    def fetch_one(self,item):
        """获取原始数据"""
        pass

    @abstractmethod
    def parse(self, raw_data) -> pd.DataFrame:
        """解析原始数据"""
        pass